<!-- //评论内容区 -->
	<a name='commettop'></a>
	<ol id="ComListOl" class="commentlist">
			<li class="comment even thread-even depth-1">
				<div id='commetcontentNew'></div>
				<div id='commetcontent'></div>
			</li>
	</ol><!-- //评论内容区结束 -->
<!-- //评论表单区 -->
<a name='postform'></a>
<div id="respond">
<h3>Leave a Reply</h3>
<div id="need">
<form action="#" method="post" name="feedback">
<input type="hidden" name="dopost" value="send" />
<input type="hidden" name="comtype" value="comments" />
<input type="hidden" name="aid" value="{dede:field name="id"/}" />
<input type="hidden" name="fid" id='feedbackfid' value="0" />
<p> <label for="username">Name</label><br />
<input name='username' type='text' class="TextArea" id='username' title="Name" size="30" maxlength="40" /></p>
<p><label for="validate">Type the show code</label><br />
<input name='validate' type='text' class="TextField" id='validate' title="Type the show code" size="10" maxlength="4" /><img src="{dede:global.cfg_cmsurl/}/include/vdimgck.php" alt="看不清？点击更换" align="middle" class="img" id="vdimgck" style="cursor: pointer;" onClick="this.src=this.src+'?'"/></p>
<p><label for="msg">Comment (max 100)</label><br />
<textarea name="msg" cols="40" rows="8" class="TextArea" id="msg" title="Comment..."></textarea></p>
<script type="text/javascript">CheckLogin();</script>
<p><input style="margin-left: 30px;" type="image" onClick='PostComment()' id="SubmitComment" class="SubmitComment" title="Post Your Comment" src="{dede:global.cfg_templets_skin/}/images/t.png" alt="发表评论" />
<label for="dcmp-submit-guest">匿名? </label>
<input type="checkbox" name="notuser" id="dcmp-submit-guest" /></p>
</form></div>
				</div>
	</div><!-- //评论表单区结束 -->

<script type="text/javascript">
<!--
function LoadCommets(page)
{
		var taget_obj = document.getElementById('commetcontent');
		var waithtml = "<div style='line-height:50px'><img src='{dede:global.cfg_cmsurl/}/images/loadinglit.gif' />评论加载中...</div>";
		var myajax = new DedeAjax(taget_obj, true, true, '', 'x', waithtml);
		myajax.SendGet2("{dede:global.cfg_phpurl /}/feedback_ajax.php?dopost=getlist&aid={dede:field.id/}&page="+page);
		DedeXHTTP = null;
}
function PostComment()
{
		var f = document.feedback;
		var nface = '6';
		var nfeedbacktype = 'feedback';
		var nvalidate = '';
		var nnotuser = '';
		var nusername = '';
		var npwd = '';
		var taget_obj = $DE('commetcontentNew');
		var waithtml = "<div style='line-height:30px'><img src='{dede:global.cfg_cmsurl/}/images/loadinglit.gif' />正在发送中...</div>";
		if(f.username.value=='')
		{
			alert("用户名为空！");
			return;
		}
		if(f.msg.value=='')
		{
			alert("评论内容不能为空！");
			return;
		}
		if(f.validate)
		{
			if(f.validate.value=='') {
				alert("请填写验证码！");
				return;
			}
			else {
				nvalidate = f.validate.value;
			}
		}
		if(f.msg.value.length > 500)
		{
			alert("你的评论是不是太长了？请填写500字以内的评论。");
			return;
		}
		if(f.feedbacktype) {
			for(var i=0; i < f.feedbacktype.length; i++)
				if(f.feedbacktype[i].checked) nfeedbacktype = f.feedbacktype[i].value;
		}
		if(f.face) {
			for(var j=0; j < f.face.length; j++)
				if(f.face[j].checked) nface = f.face[j].value;
		}
		if(f.notuser.checked) nnotuser = '1';
		if(f.username) nusername = f.username.value;
		if(f.pwd) npwd = f.pwd.value;
		
		var myajax = new DedeAjax(taget_obj, false, true, '', '', waithtml);
		myajax.sendlang = '{dede:global.cfg_soft_lang/}';
		myajax.AddKeyN('dopost', 'send');
		myajax.AddKeyN('aid', '{dede:field.id/}');
		myajax.AddKeyN('fid', f.fid.value);
		myajax.AddKeyN('face', nface);
		myajax.AddKeyN('feedbacktype', nfeedbacktype);
		myajax.AddKeyN('validate', nvalidate);
		myajax.AddKeyN('notuser', nnotuser);
		myajax.AddKeyN('username', nusername);
		myajax.AddKeyN('pwd', npwd);
		myajax.AddKeyN('msg', f.msg.value);
		myajax.SendPost2('{dede:global.cfg_phpurl/}/feedback_ajax.php');
		f.msg.value = '';
		f.fid.value = 0;
		if(f.validate)
		{
			if($DE('validateimg')) $DE('validateimg').src = "{dede:global.cfg_cmsurl/}/include/vdimgck.php?"+f.validate.value;
			f.validate.value = '';
		}
}
function quoteCommet(fid)
{
	document.feedback.fid.value = fid;
}
LoadCommets(1);
//-->
</script>